package org.zcl.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.zcl.entity.User;
import org.zcl.feign.fallback.ProducerClientFallbackFactory;

/**
 * @Package org.zcl.feign
 * @PROJECT_NAME: hystrix-demo
 * @DESCRIPTION:
 * @USER: zhuchenglin
 * @DATE: 2022/2/10 16:47
 */
@FeignClient(name = "PRODUCER", fallbackFactory = ProducerClientFallbackFactory.class)
public interface ProducerClient {

    @GetMapping("/hello/{name}")
    String hello(@PathVariable("name") String name, @RequestParam("mills") Integer mills);

    @PostMapping("/add")
    String add(@RequestBody User user);
}
